import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {

      int puerto = 2002;
      if (args.length > 0) {
          if (args[0].equals("-p")){
                puerto = Integer.parseInt(args[1]);
          }
      }
      File file = new File("index.html");
      if(file.exists()){
          file.delete();
       }

      
        file.createNewFile();
        org.jibble.simplewebserver.SimpleWebServer.main(args);
        Server g = new Server(puerto,"index.html");
        g.start();

      
    }

}

